﻿using System;
using System.Net;
using System.Windows.Forms;

namespace PhiStore.ExampleCodes.PhiElection
{
    public partial class ElectionGenerator : Form
    {
        public ElectionGenerator()
        {
            InitializeComponent();
        }

        private void Start_Click(object sender, EventArgs e)
        {
            try
            {
                IPAddress ip = IPAddress.Parse(ServerIP.Text);
                int port = int.Parse(PortNumber.Text);

                ElectionResultGenerator eg = new ElectionResultGenerator(new IPEndPoint(ip,port));
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
    }
}
